<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>demo</title>
    <script src="../common/vue.min.js" type="text/javascript"></script>
</head>
<body>
<!--view-->
<div id="e2">
    <!--一个限制是每个绑定只能包含单个表达式-->
    <div>{{b+1}}</div>
    <div>{{b*1+1}}</div>
    <hr/>
    <div>{{c+1}}</div>
    <hr/>
    <div>首字母大写： {{ e | capitalize}}</div>


</div>


<script type="text/javascript">

    /**
     *
     */
    var vm = new Vue({
        el: '#e2', //el :element
        data: {
            a: true,
            raw_html: "<span style='color: red'><b>你好啊</b></span>",
            b: "1",
            c: 1,
            d: 2,
            e:"reese"
        },
        //TODO 钩子是什么
        //vm实例创建后的钩子
        created: function () {
            console.log(this);//vm实例
            console.log("a1:" + this.a);
            console.log("a2:" + this.$data.a);
            console.log(this.a == this.$data.a);
        }
    })
    vm.$data.a = false;


</script>

</body>
</html>